{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>商品ID</th>\n",
       "      <th>类别ID</th>\n",
       "      <th>门店编号</th>\n",
       "      <th>单价</th>\n",
       "      <th>销量</th>\n",
       "      <th>成交时间</th>\n",
       "      <th>订单ID</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>30006206</td>\n",
       "      <td>915000003</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>25.23</td>\n",
       "      <td>0.328</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>30163281</td>\n",
       "      <td>914010000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>2.00</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>30200518</td>\n",
       "      <td>922000000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>19.62</td>\n",
       "      <td>0.230</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29989105</td>\n",
       "      <td>922000000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.044</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>30179558</td>\n",
       "      <td>915000100</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>47.41</td>\n",
       "      <td>0.226</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3473</th>\n",
       "      <td>30031870</td>\n",
       "      <td>915030401</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>6.58</td>\n",
       "      <td>0.862</td>\n",
       "      <td>2017/1/3 10:59</td>\n",
       "      <td>20170103CDLG000510025147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3474</th>\n",
       "      <td>30008276</td>\n",
       "      <td>911010501</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>15.42</td>\n",
       "      <td>0.481</td>\n",
       "      <td>2017/1/3 11:00</td>\n",
       "      <td>20170103CDLG000510025148</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3475</th>\n",
       "      <td>30033854</td>\n",
       "      <td>910000000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>9.62</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2017/1/3 11:17</td>\n",
       "      <td>20170103CDLG000510025149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3476</th>\n",
       "      <td>30206214</td>\n",
       "      <td>910000000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>15.62</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2017/1/3 11:40</td>\n",
       "      <td>20170103CDLG000510025150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3477</th>\n",
       "      <td>30129510</td>\n",
       "      <td>925090000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>23.21</td>\n",
       "      <td>0.312</td>\n",
       "      <td>2017/1/3 11:50</td>\n",
       "      <td>20170103CDLG000510025151</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3478 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          商品ID       类别ID  门店编号     单价     销量            成交时间  \\\n",
       "0     30006206  915000003  CDNL  25.23  0.328   2017/1/3 9:56   \n",
       "1     30163281  914010000  CDNL   2.00  2.000   2017/1/3 9:56   \n",
       "2     30200518  922000000  CDNL  19.62  0.230   2017/1/3 9:56   \n",
       "3     29989105  922000000  CDNL   2.80  2.044   2017/1/3 9:56   \n",
       "4     30179558  915000100  CDNL  47.41  0.226   2017/1/3 9:56   \n",
       "...        ...        ...   ...    ...    ...             ...   \n",
       "3473  30031870  915030401  CDXL   6.58  0.862  2017/1/3 10:59   \n",
       "3474  30008276  911010501  CDXL  15.42  0.481  2017/1/3 11:00   \n",
       "3475  30033854  910000000  CDXL   9.62  1.000  2017/1/3 11:17   \n",
       "3476  30206214  910000000  CDXL  15.62  1.000  2017/1/3 11:40   \n",
       "3477  30129510  925090000  CDXL  23.21  0.312  2017/1/3 11:50   \n",
       "\n",
       "                          订单ID  \n",
       "0     20170103CDLG000210052759  \n",
       "1     20170103CDLG000210052759  \n",
       "2     20170103CDLG000210052759  \n",
       "3     20170103CDLG000210052759  \n",
       "4     20170103CDLG000210052759  \n",
       "...                        ...  \n",
       "3473  20170103CDLG000510025147  \n",
       "3474  20170103CDLG000510025148  \n",
       "3475  20170103CDLG000510025149  \n",
       "3476  20170103CDLG000510025150  \n",
       "3477  20170103CDLG000510025151  \n",
       "\n",
       "[3478 rows x 7 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data=pd.read_csv(\"order-14.3.csv\",encoding='gbk')\n",
    "display(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>类别ID</th>\n",
       "      <th>销量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>240</th>\n",
       "      <td>922000003</td>\n",
       "      <td>425.328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>239</th>\n",
       "      <td>922000002</td>\n",
       "      <td>206.424</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>251</th>\n",
       "      <td>923000006</td>\n",
       "      <td>190.294</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>216</th>\n",
       "      <td>915030104</td>\n",
       "      <td>175.059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>238</th>\n",
       "      <td>922000001</td>\n",
       "      <td>121.355</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>367</th>\n",
       "      <td>960000000</td>\n",
       "      <td>121.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>234</th>\n",
       "      <td>920090000</td>\n",
       "      <td>111.565</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>249</th>\n",
       "      <td>923000002</td>\n",
       "      <td>91.847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237</th>\n",
       "      <td>922000000</td>\n",
       "      <td>86.395</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>247</th>\n",
       "      <td>923000000</td>\n",
       "      <td>85.845</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          类别ID       销量\n",
       "240  922000003  425.328\n",
       "239  922000002  206.424\n",
       "251  923000006  190.294\n",
       "216  915030104  175.059\n",
       "238  922000001  121.355\n",
       "367  960000000  121.000\n",
       "234  920090000  111.565\n",
       "249  923000002   91.847\n",
       "237  922000000   86.395\n",
       "247  923000000   85.845"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 畅销类别\n",
    "data.groupby(\"类别ID\")[\"销量\"].sum().reset_index().sort_values(by=\"销量\",ascending=False).head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>商品ID</th>\n",
       "      <th>销量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>29989059</td>\n",
       "      <td>391.549</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>29989072</td>\n",
       "      <td>102.876</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>469</th>\n",
       "      <td>30022232</td>\n",
       "      <td>101.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>523</th>\n",
       "      <td>30031960</td>\n",
       "      <td>99.998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>29989157</td>\n",
       "      <td>72.453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>30023041</td>\n",
       "      <td>64.416</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>505</th>\n",
       "      <td>30026255</td>\n",
       "      <td>62.375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>29989058</td>\n",
       "      <td>56.052</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>510</th>\n",
       "      <td>30027007</td>\n",
       "      <td>48.757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>903</th>\n",
       "      <td>30171264</td>\n",
       "      <td>45.000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         商品ID       销量\n",
       "8    29989059  391.549\n",
       "18   29989072  102.876\n",
       "469  30022232  101.000\n",
       "523  30031960   99.998\n",
       "57   29989157   72.453\n",
       "476  30023041   64.416\n",
       "505  30026255   62.375\n",
       "7    29989058   56.052\n",
       "510  30027007   48.757\n",
       "903  30171264   45.000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 畅销商品\n",
    "pd.pivot_table(data,index=\"商品ID\",values=\"销量\",aggfunc=\"sum\").reset_index().sort_values(by=\"销量\",ascending=False).head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>商品ID</th>\n",
       "      <th>类别ID</th>\n",
       "      <th>门店编号</th>\n",
       "      <th>单价</th>\n",
       "      <th>销量</th>\n",
       "      <th>成交时间</th>\n",
       "      <th>订单ID</th>\n",
       "      <th>销售额</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>30006206</td>\n",
       "      <td>915000003</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>25.23</td>\n",
       "      <td>0.328</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "      <td>8.27544</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>30163281</td>\n",
       "      <td>914010000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>2.00</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "      <td>4.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>30200518</td>\n",
       "      <td>922000000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>19.62</td>\n",
       "      <td>0.230</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "      <td>4.51260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29989105</td>\n",
       "      <td>922000000</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>2.80</td>\n",
       "      <td>2.044</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "      <td>5.72320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>30179558</td>\n",
       "      <td>915000100</td>\n",
       "      <td>CDNL</td>\n",
       "      <td>47.41</td>\n",
       "      <td>0.226</td>\n",
       "      <td>2017/1/3 9:56</td>\n",
       "      <td>20170103CDLG000210052759</td>\n",
       "      <td>10.71466</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3473</th>\n",
       "      <td>30031870</td>\n",
       "      <td>915030401</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>6.58</td>\n",
       "      <td>0.862</td>\n",
       "      <td>2017/1/3 10:59</td>\n",
       "      <td>20170103CDLG000510025147</td>\n",
       "      <td>5.67196</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3474</th>\n",
       "      <td>30008276</td>\n",
       "      <td>911010501</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>15.42</td>\n",
       "      <td>0.481</td>\n",
       "      <td>2017/1/3 11:00</td>\n",
       "      <td>20170103CDLG000510025148</td>\n",
       "      <td>7.41702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3475</th>\n",
       "      <td>30033854</td>\n",
       "      <td>910000000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>9.62</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2017/1/3 11:17</td>\n",
       "      <td>20170103CDLG000510025149</td>\n",
       "      <td>9.62000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3476</th>\n",
       "      <td>30206214</td>\n",
       "      <td>910000000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>15.62</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2017/1/3 11:40</td>\n",
       "      <td>20170103CDLG000510025150</td>\n",
       "      <td>15.62000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3477</th>\n",
       "      <td>30129510</td>\n",
       "      <td>925090000</td>\n",
       "      <td>CDXL</td>\n",
       "      <td>23.21</td>\n",
       "      <td>0.312</td>\n",
       "      <td>2017/1/3 11:50</td>\n",
       "      <td>20170103CDLG000510025151</td>\n",
       "      <td>7.24152</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3478 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          商品ID       类别ID  门店编号     单价     销量            成交时间  \\\n",
       "0     30006206  915000003  CDNL  25.23  0.328   2017/1/3 9:56   \n",
       "1     30163281  914010000  CDNL   2.00  2.000   2017/1/3 9:56   \n",
       "2     30200518  922000000  CDNL  19.62  0.230   2017/1/3 9:56   \n",
       "3     29989105  922000000  CDNL   2.80  2.044   2017/1/3 9:56   \n",
       "4     30179558  915000100  CDNL  47.41  0.226   2017/1/3 9:56   \n",
       "...        ...        ...   ...    ...    ...             ...   \n",
       "3473  30031870  915030401  CDXL   6.58  0.862  2017/1/3 10:59   \n",
       "3474  30008276  911010501  CDXL  15.42  0.481  2017/1/3 11:00   \n",
       "3475  30033854  910000000  CDXL   9.62  1.000  2017/1/3 11:17   \n",
       "3476  30206214  910000000  CDXL  15.62  1.000  2017/1/3 11:40   \n",
       "3477  30129510  925090000  CDXL  23.21  0.312  2017/1/3 11:50   \n",
       "\n",
       "                          订单ID       销售额  \n",
       "0     20170103CDLG000210052759   8.27544  \n",
       "1     20170103CDLG000210052759   4.00000  \n",
       "2     20170103CDLG000210052759   4.51260  \n",
       "3     20170103CDLG000210052759   5.72320  \n",
       "4     20170103CDLG000210052759  10.71466  \n",
       "...                        ...       ...  \n",
       "3473  20170103CDLG000510025147   5.67196  \n",
       "3474  20170103CDLG000510025148   7.41702  \n",
       "3475  20170103CDLG000510025149   9.62000  \n",
       "3476  20170103CDLG000510025150  15.62000  \n",
       "3477  20170103CDLG000510025151   7.24152  \n",
       "\n",
       "[3478 rows x 8 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 计算销售额\n",
    "data[\"销售额\"] = data[\"单价\"]*data[\"销量\"]\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "门店编号\n",
       "CDLG    10908.82612\n",
       "CDNL     8059.47867\n",
       "CDXL     9981.76166\n",
       "Name: 销售额, dtype: float64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 各个门店销售额分别相加\n",
    "data.groupby(\"门店编号\")[\"销售额\"].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售额</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>门店编号</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>CDLG</th>\n",
       "      <td>0.376815</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CDNL</th>\n",
       "      <td>0.278392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CDXL</th>\n",
       "      <td>0.344792</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           销售额\n",
       "门店编号          \n",
       "CDLG  0.376815\n",
       "CDNL  0.278392\n",
       "CDXL  0.344792"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 算销售额占比\n",
    "销售额占比 = data.groupby(\"门店编号\")[[\"销售额\"]].sum()/data[\"销售额\"].sum()\n",
    "销售额占比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>销售额占比</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>门店编号</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>CDLG</th>\n",
       "      <td>0.376815</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CDNL</th>\n",
       "      <td>0.278392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CDXL</th>\n",
       "      <td>0.344792</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         销售额占比\n",
       "门店编号          \n",
       "CDLG  0.376815\n",
       "CDNL  0.278392\n",
       "CDXL  0.344792"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 替换列名\n",
    "销售额占比.columns = ['销售额占比']\n",
    "销售额占比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x2798ffd0910>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAADnCAYAAADGrxD1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAavUlEQVR4nO3de3hcVb3/8fd3Jsk06WV6SZukXBygoijhViyXXlGhStCD/tRzEMqAHjxwhApHkcjxwCig4V7g9zuCBSEcBA4giPzCRUBqQ68UKd1PoS0tTcG20CtTWkrSJOv8sabH2Oaemb327Pm+nidPSi6zPz7207X3nrXXEmMMSqnwiLgOoJTKLi21UiGjpVYqZLTUSoWMllqpkNFSKxUyWmqlQkZLrVTIaKmVChkttVIho6VWKmS01EqFjJZaqZDRUisVMlpqpUJGS61UyGiplQoZLbVSIaOlVipktNRKhYyWWqmQ0VIrFTJaahVYInKNiMwXkSdE5DERWSoiS0Tkgsz37xORSfv8TkxEHhSRRhG5201yt7TUKpBE5GRgMjAR+CNwGnAxMB24WkSO6uJXZwBbjDGTgRIRmehH3iDRUqugmg48bexuE88BewCMMVuBBmBKF783DZiT+fOVwIqcpgwgLbUKqgpgG4Ax5m3gqQ7f2woM7+L3RgM7RORy4PfY0b6gaKlVUO0AhgCIyATgmx2+N5JM4TuRBoYaY24E7t77GoWkyHUAlX2J2oYYkAAOBQ4BDgZGAMOAeIfPQ4Eo0Jr52NPhz7uATcD7wHsdPm8EVjbV1aRz/D9jHvA9YBYwFdgNICLDgS9nvj6hi9/7EvAEcHTmvwuK6AZ5+StT3qOAY4HjgM9gizwWkBwffgPwBrC8w+elTXU1u7Lx4iIiwO3AeGAL0AyMy3yeZYx5WETuA04EdmZ+7RfAM8D9QCX2TPRXxpgHspEpX2ip80iitmEY8EXsdeJJ2DK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gLuNMS9n4X9H4OipXwB4Sa8VeBx4vLq+Oo49Lf9H7HppxS6zZVk79mGLh4CHBrosr4icjJ2HPxG4ELgeOB14E3hdRBZh331oEJFVwFvGmDUi4X6XUUsdMF7SS2Mf6q+vrq8egS34acDngTEus/XTduxmCQ3As17S25LF154OPG2MMSLyHHAtgDFmq4g0AFOMMf9XRF4CfoMtfOhpqQPMS3rbgXuBe6vrqwU7Y+0L2BF8MjDUYbyubAMWZj7mAPNzuJVNBfYuOcaYt0XkqQ7f2woMz/z5ReyZz4AWk8wXWuo8kXmPdlnm49ZMyccBx2Y+jst89nPf643ASux7yYuAhV7SW+Xj8XcAQwBEZALwTeDuzPdGYp/cAvg37OSVr2Evc0JNS52nMiV/K/PxyN6vV9dXjwI+sc9HAnvqPiLzMRQoo/MprO3Ym1jbgc37fGwCVmNX5VzlJT3Xc9znAd8DZmHf+98NICLDgS8Ds0TkROxc/EuB34vIE46y+kbvfheozEhfii12K9CWuWGXN8Te8bodGA9swT7oMS7zeZYx5mEReRb4d2PMqyIyG3ttfyZ2CeidmZf6hTEmNCO4llqpkNFHL5UKGS21UiGjpVYqZLTUSoWMllqpkNFSKxUyWmqlQkZLrVTIaKmVChkttVIho6VWKmS01EqFjJZaqZDRUisVMlpqpUJGS61UyGiplQoZLbVSIaOlVipktNRKhYyWWqmQ0VIrFTJaaqVCRkutVMhoqZUKGS21UiGjpVYqZP4HDE5WsMFaJyEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 制作饼图\n",
    "# 设置figure_size尺寸\n",
    "plt.rcParams['figure.figsize'] = (16.0, 8.0)\n",
    "# 用来设置字体样式以正常显示中文标签\n",
    "plt.rcParams['font.sans-serif']=['SimHei']\n",
    "# 默认是使用Unicode负号，设置正常显示字符，如正常显示负号\n",
    "plt.rcParams['axes.unicode_minus']=False    \n",
    "plt.rcParams['font.size'] = 15\n",
    "\n",
    "(data.groupby(\"门店编号\")[\"销售额\"].sum()/data[\"销售额\"].sum()).plot.pie()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "data=pd.read_csv(\"order-14.3.csv\",parse_dates=[\"成交时间\"],encoding='gbk')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x27991cb0a90>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAECCAYAAADq7fyyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO2debgcZZX/P6fvvdn35IaEQAhbZAs4EBY3ZBER4jYq4ojjiKPRcRl1RAf96TjjMDOM4zjO4oao6CiiqKMiKAyyCI4BLmAgyJKQhJD9Zr+5uUsv7++P6uqurn5r6+66Xemcz/PkSd/qqrdOd9d76tT3Pe95xRiDoiiK0jnk2m2AoiiK0lrUsSuKonQY6tgVRVE6DHXsiqIoHYY6dkVRlA5DHbuiKEqH0d1uAwDmzJljFi1a1G4zFEVRDhoefvjhHcaYXtt7mXDsixYtoq+vr91mKIqiHDSIyHNB76kUoyiK0mGoY1cURekw1LEriqJ0GOrYFUVROoxUBk9F5C+Ay8t/zgAeMMa8J41zKYqiKLWkErEbY75ijDnPGHMecB/w9TTOoyiKotSTqhQjIguAw4wxmsvYBP/0yyf56aOb+OD3H2VotNhucxRFyThp57G/H/iK7Q0RWQ4sB1i4cGHKZhzcfO3etZXX57+glzecfkQbrVEUJeukFrGLSA44H7jH9r4x5jpjzFJjzNLeXuvkKUVRFKUB0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Z8BrscpyfoaYK6IHIvjyM8DFgEXA38ErBCRFTiLLPwMZz1LV4r5jP9Untc5929jTF0+vIiMw9H9FWVM0Dx2pdP4C5w88t8C78FZHOEuY8ybcFIS/x3YjRPBf90Y8wpjzO+NMd8CzsTJcFkMDAB9wN8DGGP+zj2BiFwG/CVOGiTAFJxsmzpE5Hs4A6qa7qiMGVrdUekoRKQHwBjjrnQzzxizxfP+YmPMM02eYyJQ8izGELbv1IOx7KtycKOOXVEUpcNQKUZRFKXDUMeuKIrSYahjVxRF6TDUsSuKonQY6tgVRVE6jP8P2mLpb4PqhtgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 制作订单随着成交时间推移的折线图\n",
    "data[\"成交时间\"]\n",
    "# 对时间和订单重复的数据进行去重\n",
    "final=data[[\"成交时间\",\"订单ID\"]].drop_duplicates()\n",
    "final.groupby(\"成交时间\")[\"订单ID\"].count().plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
